//
//  MSRichLabel.h
//  Community
//
//  Created by luo danal on 3/1/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreText/CoreText.h>
#import <QuartzCore/QuartzCore.h>

@interface MSRichLabel : UILabel
{
    CATextLayer *_textLayer;
}

+ (CGSize)sizeConstrainedToSize:(CGSize)size attributedString:(NSAttributedString *)string font:(UIFont *)font breakMode:(int)breakMode;

- (CGSize)sizeConstrainedToSize:(CGSize)size;

- (void)setHTMLText:(NSString *)htmlText;

- (void)setFont:(UIFont *)font inRange:(NSRange)range;

- (void)setColor:(UIColor *)color inRange:(NSRange)range;

- (void)setUnderline:(UIColor *)color inRange:(NSRange)range;

//wdith > 0 :stroke ; width < 0 stroke and fill
- (void)setStrokeWidth:(CGFloat)width inRange:(NSRange)range;

@end

/*
@interface MSRichLabel : UILabel {
    BOOL _selectAll;
}

@property (copy,nonatomic) NSString *richText;

@property (nonatomic) BOOL isTop;
@property (nonatomic) BOOL isGold;
@property (nonatomic) BOOL hasImage;
@property (assign,nonatomic) NSInteger maxLines;
@property (nonatomic) BOOL trancated;
@property (nonatomic) BOOL enableSelection;

+ (CGFloat)defaultLineHeight;
+ (NSInteger)rowsOfText:(NSString *)text withFont:(UIFont *)font forWidth:(CGFloat)width;
+ (CGSize)sizeOfText:(NSString *)text withFont:(UIFont *)font forWidth:(CGFloat)width;
@end
*/